#include "Label.hpp"

namespace Gui
{
    using namespace RevEng;
    
    ControlImpl* Label::__GetImpl() const
    {
        return m_pLabel;
    }
    
    
    Label::Label(   const Control &Parent, 
                    const std::string &Text, 
                    const Vector2<int> &Pos, 
                    const Size2<int> &Size) 
    {
        m_pLabel = LabelImpl::New(Parent.__GetImpl(), Text, Pos, Size);
        
        /*Bind properties*/
		Control::Position	= TProperty< ControlImpl, Vector2<int> >(m_pLabel, &ControlImpl::PropertySet_Position	, &ControlImpl::PropertyGet_Position);
		Control::Size		= TProperty< ControlImpl, Size2<int> >	(m_pLabel, &ControlImpl::PropertySet_Size		, &ControlImpl::PropertyGet_Size);
		Control::Visible	= TProperty< ControlImpl, bool >		(m_pLabel, &ControlImpl::PropertySet_Visible	, &ControlImpl::PropertyGet_Visible);
		Control::Text		= TProperty< ControlImpl, std::string > (m_pLabel, &ControlImpl::PropertySet_Text		, &ControlImpl::PropertyGet_Text);
		
		Alignment = TProperty<LabelImpl, TextAlignment> (m_pLabel, &LabelImpl::PropertySet_TextAlignment, &LabelImpl::PropertyGet_TextAlignment);
    }
}
